package wwk.common.util;

import java.io.IOException;
import java.io.InputStream;

public class StreamUtil
{
	public static byte[] readStream(InputStream inputStream)
	{
		byte[] bytes=null;
		try
		{
			int size=inputStream.available();
			if(size>0)
			{
				bytes=new byte[size];
				inputStream.read(bytes);
			}
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}

		return bytes;
	}
}
